import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {HashRouter as Router, Switch, Route, Link} from "react-router-dom";// BrowserRouter as Router【需要服务器配合】,

import store from "./store/index";

import reportWebVitals from './reportWebVitals';

import './index.css';
import App from './App';
import Page001 from './page/Page001'
import LifeCycle from './page/LifeCycle'

// import {add} from './store/actions/main'
// store.dispatch(add(100))
// console.log('TAG',store.getState().appStatus.count)


ReactDOM.render(
    <Provider store={store}>
        <Router history={Router}>
            <Switch>
                <Route path="/page001" component={Page001}/>
                <Route path="/page002" component={LifeCycle}/>
                <Route path="/" component={App}/>
            </Switch>
        </Router>
    </Provider>,
  document.getElementById('root')
);

reportWebVitals();
